package com.shangqing.document_management.config;

        import com.shangqing.document_management.util.SysInterceptor;
        import org.springframework.context.annotation.Bean;
        import org.springframework.context.annotation.Configuration;
        import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
        import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * 配置拦截器
 */
@Configuration
public class InterfaceConfig implements WebMvcConfigurer {
    @Bean
    public SysInterceptor sysInterceptor() {
        return new SysInterceptor();
    }
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(sysInterceptor()).addPathPatterns("/**");
    }

}
